package cn.xsw.common;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum  CommonEnum implements BaseErrorInfoInterface{
    // 数据操作错误定义
    SUCCESS(200, "成功!"),
    BODY_NOT_MATCH(400,"请求的数据格式不符!"),
    NOT_FOUND(404, "未找到资源或参数检验失败!"),
    UNAUTHORIZED(401, "暂未登录或token已经过期!"),
    FORBIDDEN(403, "没有相关权限!"),
    UNSUPPORTED_MEDIA_TYPE(415,"不支持的媒体类型"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误!"),
    SERVER_BUSY(503,"服务器正忙，请稍后再试!"),
    MAX_UPLOAD_SIZE(504,"上传文件过大!"),
    EXPIRED_JWT(505, "登录信息过期！请重新登录！"),
    SIGNATURE_DISABLE(506, "登录信息失效！请重新登录！");
//    1048576bytes

    /** 错误码 */
    private Integer resultCode;
    /** 错误描述 */
    private String resultMsg;



    @Override
    public Integer getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}
